﻿using Verse;
using UnityEngine;
using Verse.Noise;

public class MultipleProjectile_Explosive : Projectile_Explosive
{

    

    protected override void Explode()
    {
        Map map = base.Map;
        for(int i = 0; i < this.def.projectile.extraDamages.Count; i++)
        {
           var damage =  this.def.projectile.extraDamages[i];
            GenExplosion.DoExplosion(base.Position, map, def.projectile.explosionRadius, damage.def, launcher, (int)damage.amount, damage.armorPenetration, def.projectile.soundExplode, equipmentDef, def, intendedTarget.Thing, def.projectile.postExplosionSpawnThingDef, postExplosionSpawnThingDefWater: def.projectile.postExplosionSpawnThingDefWater, postExplosionSpawnChance: def.projectile.postExplosionSpawnChance, postExplosionSpawnThingCount: def.projectile.postExplosionSpawnThingCount, postExplosionGasType: def.projectile.postExplosionGasType, preExplosionSpawnThingDef: def.projectile.preExplosionSpawnThingDef, preExplosionSpawnChance: def.projectile.preExplosionSpawnChance, preExplosionSpawnThingCount: def.projectile.preExplosionSpawnThingCount, applyDamageToExplosionCellsNeighbors: def.projectile.applyDamageToExplosionCellsNeighbors, chanceToStartFire: def.projectile.explosionChanceToStartFire, damageFalloff: def.projectile.explosionDamageFalloff, direction: origin.AngleToFlat(destination), ignoredThings: null, affectedAngle: null, doVisualEffects: true, propagationSpeed: def.projectile.damageDef.expolosionPropagationSpeed, excludeRadius: 0f, doSoundEffects: true, screenShakeFactor: def.projectile.screenShakeFactor);
        } 
        base.Explode();
    }
}

